//
//  UIColor+Addtions.swift
//  CFUnion
//
//  Created by 苑伟 on 16/8/23.
//  Copyright © 2016年 苑伟. All rights reserved.
//

import UIKit

extension UIColor
{
    class func HexColor(hexColor: Int32 ) -> UIColor {
        let r = CGFloat(((hexColor & 0x00FF0000) >> 16)) / 255.0
        let g = CGFloat(((hexColor & 0x0000FF00) >> 8)) / 255.0
        let b = CGFloat(hexColor & 0x000000FF) / 255.0
        
        return UIColor(red: r, green: g, blue: b, alpha: 1.0)
    }
}

func RGBColorWith(red : Int,green : Int, blue :Int) -> UIColor {
    return UIColor(red: CGFloat(red) / 255.0, green: CGFloat(green) / 255.0, blue: CGFloat(blue) / 255.0, alpha: 1)
}

struct BaseColor {
    /**
     用于重要级段落文字信息 标题信息
     */
    static let BlackColor = UIColor.HexColor(hexColor: 0x000000)
    
    /**
     用于普通级段落文字 引导词
     */
    static let DarkGrayColor = UIColor.HexColor(hexColor: 0x343434)

    /**
     用于普通级文字
     */
    static let GrayColor = UIColor.HexColor(hexColor: 0x585858)
    
    /**
     用于辅助次要文字信息
     */

    static let LightGrayColor = UIColor.HexColor(hexColor: 0x9c9c9c)

    /**
     用于辅助次要文字信息
     */
    static let lightGrayColor = UIColor.HexColor(hexColor: 0xbebebe)
    /**
     用于边框颜色
     */
    static let BorderColor = UIColor.HexColor(hexColor: 0xf0f0f0)
    /**
     用于分割线颜色
     */
    static let SeperatorColor = UIColor.HexColor(hexColor: 0xe5e5e5)
    /**
     用于界面背景颜色
     */

    static let BackGroundColor = UIColor.HexColor(hexColor: 0xf6f6f6)

    /**
     蓝色
     */
    static let BlueColor = UIColor.HexColor(hexColor: 0x3d93fd)
    /**
     黄色
     */
    static let YellowColor = UIColor.HexColor(hexColor: 0xff8903)
    /**
     红色
     */
    static let RedColor = UIColor.HexColor(hexColor: 0xff0018)
}
